<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	version="1.0">
	
	<xsl:template match="/canss">
		<html>
			<body>
				<h1>
					Event Log
				</h1>
				<xsl:template match="canssEvent_eventGroup">
					<table>
						<tbody>
							<th scope='col'>No</th>
							<th scope='col'>Module ID</th>
							<th scope='col'>Module Name</th>
							<th scope='col'>Event Name</th>
							<th scope='col'>Timestamp</th>
							<th scope='col'>View Details</th>
							
							<xsl:for-each select="/canss/canssEvent_eventGroup/canssEvent_eventDescription">
								<tr>
									<td scope='col'>
										<center><xsl:number format="1"/></center>
									</td>
									<td>
										<xsl:value-of select="canssModule_mid"/>
									</td>
									<td>
										<xsl:value-of select="canssModule_name"/>
									</td>
									<td>
										<xsl:value-of select="canssEvent_EventName"/>
									</td>
									<td>
										<xsl:value-of select="canssEvent_Timestamp"/>
									</td>
									<td>
										<xsl:variable name="v_count" select="index"/>
										<form id="frm_eventlogdetail_{$v_count}" action="getEventLogDetail.jsp" method="POST">
											<xsl:variable name="v_mid" select="canssModule_mid" />
											<xsl:variable name="v_eventid" select="canssEvent_EventID" />
											<xsl:variable name="v_seqnum" select="canssEvent_EventSeqnum" />
											<xsl:variable name="v_timestamp" select="canssEvent_Timestamp" />
											<input type="hidden" name="_mid" value="{$v_mid}" />
											<input type="hidden" name="_eventid" value="{$v_eventid}" />
											<input type="hidden" name="_seqnum" value="{$v_seqnum}" />
											<input type="hidden" name="_timestamp" value="{$v_timestamp}" />
											<a href="#"
												onclick="
													var frm=getobj('frm_eventlogdetail_{$v_count}');
													window.open('','pop_evenglogdetail','width=740,height=850');
													frm.target='pop_evenglogdetail';
													frm.submit();
												"
											>View Detail</a>
										</form>
									</td>
								</tr>
							</xsl:for-each>
						</tbody>
					</table>
				</xsl:template>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>

